package com.lpssfxy.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lpssfxy.utils.Constant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * 历用于封装历史评分最多商品接口返回结果
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Document(value = Constant.MONGODB_RATE_MORE_PRODUCTS_COLLECTION)
public class RateMoreProduct {
    @JsonIgnore
    private String _id;
    private Integer productId; // 被评分的商品ID
    private Integer total; // 被评分的商品总次数
    private List<Product> products; // 商品评分列表
}
